<template lang="pug">
  div.exam-list
    div.page-title
      h1 考试列表
    div.page-cnt
      el-table(v-bind:data="examList" style="width: 100%")
        el-table-column(prop="id" label="ID" width="40" fixed="left")
        el-table-column(prop="title" label="考试名称")
        el-table-column(prop="km" label="考试科目" width="180")
        el-table-column(prop="datetime" label="考试时间" width="180")
        el-table-column(prop="stuCount" label="应到人数" width="180")
        el-table-column(prop="stuCount2" label="实到人数" width="180")
        el-table-column(prop="stuCount3" label="交卷数量" width="180")
        el-table-column(prop="date" label="操作" width="50" fixed="right")
          template(slot-scope="scope")
            el-button(v-on:click="handleClickEnter(scope.row)" type="text" size="small") 进入
</template>

<script type="text/ecmascript-6">
  export default {
    data() {
      return {
        examList: []
      }
    },
    mounted() {
      let _examList = []
      for (let i = 0; i < 10; i++) {
        _examList.push({
          id: (i + 1),
          title: '考试名称',
          km: '考试科目',
          datetime: '考试时间',
          stuCount: '应到人数',
          stuCount2: '实到人数',
          stuCount3: '交卷数量'
        })
      }
      this.examList = _examList
    },
    methods: {
      handleClickEnter(row) {
        this.$router.replace({name: 'QuestionsList'})
      }
    }
  }
</script>

<style scoped lang="stylus" rel="stylesheet/stylus">
  .exam-list
    .page-title
      font-size 18px
      padding 20px

  /*.page-cnt*/
</style>
